Add RSpec test suite with Rake task and CI workflow#6
Open
julioalucero wants to merge 6 commits into
Open
Conversation
etagwerker
requested changes
Jul 16, 2026
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| ruby: ['2.7', '3.0', '3.1', '3.2'] |
etagwerker
reviewed
Jul 16, 2026
etagwerker
left a comment
Member
There was a problem hiding this comment.
@julioalucero Also, please add a line to the CHANGELOG file
Member
Author
|
@etagwerker done with it! |
There was a problem hiding this comment.
Pull request overview
This PR introduces an initial automated test and CI setup for the jekyll-external-link-accessibility gem, aiming to lock in the current link-rewriting behavior prior to/around the v0.2.0 release so future changes can be made safely.
Changes:
- Adds an RSpec test suite covering URL/host detection, external-link detection, link rewriting behavior, and the Jekyll
:pages, :post_renderhook behavior. - Adds a
Rakefileto run the specs viarake, plus RSpec/Rake development dependencies. - Adds a GitHub Actions CI workflow to run the test suite across a Ruby version matrix, and updates lockfile/changelog accordingly.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/spec_helper.rb | Adds RSpec configuration and a Jekyll page test double helper. |
| spec/jekyll-external-link-accessibility_spec.rb | Adds unit-style coverage for host parsing, external link detection, and HTML rewriting output. |
| spec/hooks_spec.rb | Adds a hook-level spec verifying rewrites only happen for .html/.htm pages. |
| Rakefile | Adds a default rake task to run the RSpec suite. |
| jekyll-external-link-accessibility.gemspec | Adds rspec and rake as development dependencies. |
| Gemfile.lock | Locks the new dev dependencies and updates the local gem version reference. |
| CHANGELOG.md | Records the new test/CI addition in the unreleased section. |
| .rspec | Configures RSpec to require spec_helper and sets output formatting. |
| .github/workflows/ci.yml | Adds CI workflow running bundle exec rake across a Ruby matrix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Member
Author
|
@etagwerker fixed the CI, Gemfile.lock was not updated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to Jira
FR-740: Fix nofollow on internal links
Description
The gem had no tests, Rakefile, or CI right before the v0.2.0 release. This pins the current link rewriting behavior so the release and future changes are safe. No
lib/source changed, specs only lock existing behavior.spec/jekyll-external-link-accessibility_spec.rbcoveringhost_for,external_link?, andmodify_links(icon/span/target/title, external-onlyrel, skip rules, config overrides, existing-attr preservation)spec/hooks_spec.rbthat fires the real pages hook to confirm.html/.htmget rewritten and.xml/.json/.txtare skippedspec/spec_helper.rbwith afake_pagehelper (two Structs standing in for a Jekyll page)rspec+rakedev dependencies to the gemspecRakefile(rakeruns the suite) and GitHub Actions CI across Ruby 2.7–4.0Gemfile.lockpicked up the dev deps and a stale0.1.0 → 0.2.0bumpQA steps
bundle installbundle exec rspec, 17 examples, 0 failuresbundle exec rake, same, via the default task